package com.kaoshi.user.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2024-11-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("operation_log")
@ApiModel(value="OperationLog对象", description="")
public class OperationLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "操作内容")
    private String name;

    @ApiModelProperty(value = "操作时间")
    private LocalDateTime time;

    @ApiModelProperty(value = "操作人")
    private String username;

    @ApiModelProperty(value = "操作人ip")
    private String ip;

    @TableField(exist = false)
    private LocalDateTime start;
    @TableField(exist = false)
    private LocalDateTime end;



    public OperationLog(Integer id, String name, LocalDateTime time, String username, String ip) {
        this.id = id;
        this.name = name;
        this.time = time;
        this.username = username;
        this.ip = ip;
    }
}
